﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Threading;

namespace MvcMusicStore.BI
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Sales" in code, svc and config file together.
    public class Sales : ISales
    {
        public IList<SalesByMonth> GetSalesByMonth()
        {
          Thread.Sleep(1000);
            return new List<SalesByMonth>()
                {new SalesByMonth(){Month = "Jan", Amount = 34.5m},
                new SalesByMonth(){Month = "Fev", Amount = 12.58m},
                new SalesByMonth(){Month = "Mar", Amount = 3.5m},
                new SalesByMonth(){Month = "Apr", Amount = 28.3m}
                };
        }

        public IList<SalesByGenre> GetSalesByGenre()
        {
          Thread.Sleep(2000);
          return new BindingList<SalesByGenre>() 
                {new SalesByGenre(){Genre = "Rock", Amount = (98.4m)},
                new SalesByGenre(){Genre = "Rap", Amount = (26.2m)},
                new SalesByGenre(){Genre = "Jazz", Amount = (67.4m)} 
                }
                ;
        }
    }
}
